<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改车辆-信息')" />
    <th:block th:include="include :: bootstrap-fileinput-css" />
    <th:block th:include="include :: select2-css" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-info-edit" th:object="${carInfo}">
            <input name="carInfoId" th:field="*{carInfoId}" type="hidden">
            <input name="carId" th:field="*{carId}" type="hidden">
            <input name="menuId" th:field="*{menuId}" type="hidden">
            <input name="configType" th:field="*{configType}" type="hidden">
            <input id="car_info" name="info" th:field="*{info}" type="hidden">

            <div class="row clearfix">
                <div class="col-sm-2 column">
                    预览图片
                    <ul class="list-group" id="left_img_list"></ul>
                </div>
                <div class="col-sm-10 column">
                    <div class="row clearfix">
                        <div class="col-md-12 column">
                            <th:block class="form-group" th:if="${carInfo.carInfoId!=null}">
                                <label class="col-sm-1 control-label">图片</label>
                                <div class="col-sm-11" th:include="system/common/file_select :: multiple_img(_file_id='multipleFile',_img_list_id='left_img_list',_file_list=${@file.getFiles(carInfo.carId,carInfo.configType)})"/>
                            </th:block>
                        </div>
                    </div>

                    <div class="row clearfix" style='vertical-align: middle;text-align: center'>
                        <div class="form-group">
                            <div class="col-sm-2 column"><h1><span class="car_item label" th:onclick="multipleFile_manager.initImgList(this,[[${carInfo.carId}]],[[${carInfo.configType}]],'lighting-function-headlights')">照明功能（大灯）</span></h1></div>
                            <div class="col-sm-2 column"><h1><span class="car_item label" th:onclick="multipleFile_manager.initImgList(this,[[${carInfo.carId}]],[[${carInfo.configType}]],'headlights')">大灯</span></h1></div>
                            <div class="col-sm-2 column"><h1><span class="car_item label" th:onclick="multipleFile_manager.initImgList(this,[[${carInfo.carId}]],[[${carInfo.configType}]],'small-lights')">小灯</span></h1></div>
                            <div class="col-sm-2 column"><h1><span class="car_item label" th:onclick="multipleFile_manager.initImgList(this,[[${carInfo.carId}]],[[${carInfo.configType}]],'low-beam-lights')">近光灯</span></h1></div>
                            <div class="col-sm-2 column"><h1><span class="car_item label" th:onclick="multipleFile_manager.initImgList(this,[[${carInfo.carId}]],[[${carInfo.configType}]],'high-beam')">远光灯</span></h1></div>
                            <div class="col-sm-2 column"><h1><span class="car_item label" th:onclick="multipleFile_manager.initImgList(this,[[${carInfo.carId}]],[[${carInfo.configType}]],'daytime-running-lights')">日间行车灯</span></h1></div>
                            <div class="col-sm-2 column"><h1><span class="car_item label" th:onclick="multipleFile_manager.initImgList(this,[[${carInfo.carId}]],[[${carInfo.configType}]],'turn-signal')">转向灯</span></h1></div>
                            <div class="col-sm-2 column"><h1><span class="car_item label" th:onclick="multipleFile_manager.initImgList(this,[[${carInfo.carId}]],[[${carInfo.configType}]],'front-fog-lights')">前雾灯</span></h1></div>
                            <div class="col-sm-2 column"><h1><span class="car_item label" th:onclick="multipleFile_manager.initImgList(this,[[${carInfo.carId}]],[[${carInfo.configType}]],'lighting-function-taillight')">照明功能（尾灯）</span></h1></div>
                            <div class="col-sm-2 column"><h1><span class="car_item label" th:onclick="multipleFile_manager.initImgList(this,[[${carInfo.carId}]],[[${carInfo.configType}]],'rear-tail-light')">后尾灯</span></h1></div>
                            <div class="col-sm-2 column"><h1><span class="car_item label" th:onclick="multipleFile_manager.initImgList(this,[[${carInfo.carId}]],[[${carInfo.configType}]],'rear-tail-light-small')">小灯（后尾灯）</span></h1></div>
                            <div class="col-sm-2 column"><h1><span class="car_item label" th:onclick="multipleFile_manager.initImgList(this,[[${carInfo.carId}]],[[${carInfo.configType}]],'brake-light')">刹车灯</span></h1></div>
                            <div class="col-sm-2 column"><h1><span class="car_item label" th:onclick="multipleFile_manager.initImgList(this,[[${carInfo.carId}]],[[${carInfo.configType}]],'rear-fog-lights')">后雾灯</span></h1></div>
                            <div class="col-sm-2 column"><h1><span class="car_item label" th:onclick="multipleFile_manager.initImgList(this,[[${carInfo.carId}]],[[${carInfo.configType}]],'reversing-lights')">倒车灯</span></h1></div>
                            <div class="col-sm-2 column"><h1><span class="car_item label" th:onclick="multipleFile_manager.initImgList(this,[[${carInfo.carId}]],[[${carInfo.configType}]],'rear-turn-signal')">后转向灯</span></h1></div>
                            <div class="col-sm-2 column"><h1><span class="car_item label" th:onclick="multipleFile_manager.initImgList(this,[[${carInfo.carId}]],[[${carInfo.configType}]],'high-mount-brake-light')">高位刹车灯</span></h1></div>
                            <div class="col-sm-2 column"><h1><span class="car_item label" th:onclick="multipleFile_manager.initImgList(this,[[${carInfo.carId}]],[[${carInfo.configType}]],'rear-view-mirror-turn-signal')">后视镜转向灯</span></h1></div>
                            <div class="col-sm-2 column"><h1><span class="car_item label" th:onclick="multipleFile_manager.initImgList(this,[[${carInfo.carId}]],[[${carInfo.configType}]],'side-turn-signal')">侧边转向灯</span></h1></div>
                            <div class="col-sm-2 column"><h1><span class="car_item label" th:onclick="multipleFile_manager.initImgList(this,[[${carInfo.carId}]],[[${carInfo.configType}]],'license-plate-light')">牌照灯</span></h1></div>
                            <div class="col-sm-2 column"><h1><span class="car_item label" th:onclick="multipleFile_manager.initImgList(this,[[${carInfo.carId}]],[[${carInfo.configType}]],'turn-assist-light')">转向辅助灯</span></h1></div>
                            <div class="col-sm-2 column"><h1><span class="car_item label" th:onclick="multipleFile_manager.initImgList(this,[[${carInfo.carId}]],[[${carInfo.configType}]],'floor-light-1-1')">照地灯1.1</span></h1></div>
                            <div class="col-sm-2 column"><h1><span class="car_item label" th:onclick="multipleFile_manager.initImgList(this,[[${carInfo.carId}]],[[${carInfo.configType}]],'floor-light-1-2')">照地灯1.2</span></h1></div>
                            <div class="col-sm-2 column"><h1><span class="car_item label" th:onclick="multipleFile_manager.initImgList(this,[[${carInfo.carId}]],[[${carInfo.configType}]],'floor-light-1-3')">照地灯1.3</span></h1></div>
                            <div class="col-sm-2 column"><h1><span class="car_item label" th:onclick="multipleFile_manager.initImgList(this,[[${carInfo.carId}]],[[${carInfo.configType}]],'floor-light-2-1')">照地灯2.1</span></h1></div>
                            <div class="col-sm-2 column"><h1><span class="car_item label" th:onclick="multipleFile_manager.initImgList(this,[[${carInfo.carId}]],[[${carInfo.configType}]],'floor-light-2-2')">照地灯2.2</span></h1></div>
                            <div class="col-sm-2 column"><h1><span class="car_item label" th:onclick="multipleFile_manager.initImgList(this,[[${carInfo.carId}]],[[${carInfo.configType}]],'floor-light-2-3')">照地灯2.3</span></h1></div>
                            <div class="col-sm-2 column"><h1><span class="car_item label" th:onclick="multipleFile_manager.initImgList(this,[[${carInfo.carId}]],[[${carInfo.configType}]],'safety-warning-light')">安全警示灯</span></h1></div>
                            <div class="col-sm-2 column"><h1><span class="car_item label" th:onclick="multipleFile_manager.initImgList(this,[[${carInfo.carId}]],[[${carInfo.configType}]],'exterior-door-handle-lighting')">外门把手照明灯</span></h1></div>
                            <div class="col-sm-2 column"><h1><span class="car_item label" th:onclick="multipleFile_manager.initImgList(this,[[${carInfo.carId}]],[[${carInfo.configType}]],'wheel-eyebrow-light')">轮眉灯</span></h1></div>
                            <div class="col-sm-2 column"><h1><span class="car_item label" th:onclick="multipleFile_manager.initImgList(this,[[${carInfo.carId}]],[[${carInfo.configType}]],'front-reading-light')">前部阅读灯</span></h1></div>
                            <div class="col-sm-2 column"><h1><span class="car_item label" th:onclick="multipleFile_manager.initImgList(this,[[${carInfo.carId}]],[[${carInfo.configType}]],'central-reading-light')">中部阅读灯</span></h1></div>
                            <div class="col-sm-2 column"><h1><span class="car_item label" th:onclick="multipleFile_manager.initImgList(this,[[${carInfo.carId}]],[[${carInfo.configType}]],'row3-reading-light')">第3排阅读灯</span></h1></div>
                            <div class="col-sm-2 column"><h1><span class="car_item label" th:onclick="multipleFile_manager.initImgList(this,[[${carInfo.carId}]],[[${carInfo.configType}]],'driver-seat-vanity-mirror')">主驾驶位化妆镜</span></h1></div>
                            <div class="col-sm-2 column"><h1><span class="car_item label" th:onclick="multipleFile_manager.initImgList(this,[[${carInfo.carId}]],[[${carInfo.configType}]],'passenger-seat-vanity-mirror')">副驾驶位化妆镜</span></h1></div>
                            <div class="col-sm-2 column"><h1><span class="car_item label" th:onclick="multipleFile_manager.initImgList(this,[[${carInfo.carId}]],[[${carInfo.configType}]],'glove-box-light')">手套箱灯</span></h1></div>
                            <div class="col-sm-2 column"><h1><span class="car_item label" th:onclick="multipleFile_manager.initImgList(this,[[${carInfo.carId}]],[[${carInfo.configType}]],'driver-foot-light')">主驾驶位脚踏灯</span></h1></div>
                            <div class="col-sm-2 column"><h1><span class="car_item label" th:onclick="multipleFile_manager.initImgList(this,[[${carInfo.carId}]],[[${carInfo.configType}]],'passenger-foot-light')">副驾驶位脚踏灯</span></h1></div>
                            <div class="col-sm-2 column"><h1><span class="car_item label" th:onclick="multipleFile_manager.initImgList(this,[[${carInfo.carId}]],[[${carInfo.configType}]],'rear-foot-light')">后排脚踏灯</span></h1></div>
                            <div class="col-sm-2 column"><h1><span class="car_item label" th:onclick="multipleFile_manager.initImgList(this,[[${carInfo.carId}]],[[${carInfo.configType}]],'trunk-light')">后备箱灯</span></h1></div>
                            <div class="col-sm-2 column"><h1><span class="car_item label" th:onclick="multipleFile_manager.initImgList(this,[[${carInfo.carId}]],[[${carInfo.configType}]],'central-control-front-storage-light')">中控前储物灯</span></h1></div>
                            <div class="col-sm-2 column"><h1><span class="car_item label" th:onclick="multipleFile_manager.initImgList(this,[[${carInfo.carId}]],[[${carInfo.configType}]],'central-control-cup-holder-light')">中控杯架灯</span></h1></div>
                            <div class="col-sm-2 column"><h1><span class="car_item label" th:onclick="multipleFile_manager.initImgList(this,[[${carInfo.carId}]],[[${carInfo.configType}]],'central-control-armrest-box-light')">中控扶手箱灯</span></h1></div>
                            <div class="col-sm-2 column"><h1><span class="car_item label" th:onclick="multipleFile_manager.initImgList(this,[[${carInfo.carId}]],[[${carInfo.configType}]],'interior-door-handle-light')">内门把手灯</span></h1></div>
                            <div class="col-sm-2 column"><h1><span class="car_item label" th:onclick="multipleFile_manager.initImgList(this,[[${carInfo.carId}]],[[${carInfo.configType}]],'door-storage-box-light')">门储物盒灯</span></h1></div>
                            <div class="col-sm-2 column"><h1><span class="car_item label" th:onclick="multipleFile_manager.initImgList(this,[[${carInfo.carId}]],[[${carInfo.configType}]],'ambient-light')">氛围灯</span></h1></div>
                            <div class="col-sm-2 column"><h1><span class="car_item label" th:onclick="multipleFile_manager.initImgList(this,[[${carInfo.carId}]],[[${carInfo.configType}]],'front-welcome-light')">前迎宾灯</span></h1></div>
                            <div class="col-sm-2 column"><h1><span class="car_item label" th:onclick="multipleFile_manager.initImgList(this,[[${carInfo.carId}]],[[${carInfo.configType}]],'rear-welcome-light')">后迎宾灯</span></h1></div>
                            <div class="col-sm-2 column"><h1><span class="car_item label" th:onclick="multipleFile_manager.initImgList(this,[[${carInfo.carId}]],[[${carInfo.configType}]],'controller-light')">控制器指示灯（整体视图）</span></h1></div>
                            <div class="col-sm-2 column"><h1><span class="car_item label" th:onclick="multipleFile_manager.initImgList(this,[[${carInfo.carId}]],[[${carInfo.configType}]],'controller-light-steering-wheel')">方向盘控制器灯</span></h1></div>
                            <div class="col-sm-2 column"><h1><span class="car_item label" th:onclick="multipleFile_manager.initImgList(this,[[${carInfo.carId}]],[[${carInfo.configType}]],'controller-light-dashboard')">仪表盘控制器灯</span></h1></div>
                            <div class="col-sm-2 column"><h1><span class="car_item label" th:onclick="multipleFile_manager.initImgList(this,[[${carInfo.carId}]],[[${carInfo.configType}]],'controller-light-ceiling')">顶棚控制器灯</span></h1></div>
                            <div class="col-sm-2 column"><h1><span class="car_item label" th:onclick="multipleFile_manager.initImgList(this,[[${carInfo.carId}]],[[${carInfo.configType}]],'controller-light-center-console')">中控台控制器灯</span></h1></div>
                            <div class="col-sm-2 column"><h1><span class="car_item label" th:onclick="multipleFile_manager.initImgList(this,[[${carInfo.carId}]],[[${carInfo.configType}]],'controller-light-door')">门控制器灯</span></h1></div>
                            <div class="col-sm-2 column"><h1><span class="car_item label" th:onclick="multipleFile_manager.initImgList(this,[[${carInfo.carId}]],[[${carInfo.configType}]],'odometer-display-page')">里程表显示页面</span></h1></div>
                            <div class="col-sm-2 column"><h1><span class="car_item label" th:onclick="multipleFile_manager.initImgList(this,[[${carInfo.carId}]],[[${carInfo.configType}]],'lcd-display-page')">LCD显示页面</span></h1></div>
                            <div class="col-sm-2 column"><h1><span class="car_item label" th:onclick="multipleFile_manager.initImgList(this,[[${carInfo.carId}]],[[${carInfo.configType}]],'other-indicators')">其它指示灯</span></h1></div>
                            <div class="col-sm-2 column"><h1><span class="car_item label" th:onclick="multipleFile_manager.initImgList(this,[[${carInfo.carId}]],[[${carInfo.configType}]],'exhaust-system-detail')">排气系统细节照</span></h1></div>
                            <div class="col-sm-2 column"><h1><span class="car_item label" th:onclick="multipleFile_manager.initImgList(this,[[${carInfo.carId}]],[[${carInfo.configType}]],'fuel-tank-system-all')">油箱系统整体照</span></h1></div>
                            <div class="col-sm-2 column"><h1><span class="car_item label" th:onclick="multipleFile_manager.initImgList(this,[[${carInfo.carId}]],[[${carInfo.configType}]],'fuel-tank-system-detail')">油箱系统细节照</span></h1></div>
                            <div class="col-sm-2 column"><h1><span class="car_item label" th:onclick="multipleFile_manager.initImgList(this,[[${carInfo.carId}]],[[${carInfo.configType}]],'heat-shield-detail')">隔热板细节照</span></h1></div>
                            <div class="col-sm-2 column"><h1><span class="car_item label" th:onclick="multipleFile_manager.initImgList(this,[[${carInfo.carId}]],[[${carInfo.configType}]],'pipeline-detail')">管路细节照</span></h1></div>
                            <div class="col-sm-2 column"><h1><span class="car_item label" th:onclick="multipleFile_manager.initImgList(this,[[${carInfo.carId}]],[[${carInfo.configType}]],'battery-pack-all')">电池包整体照</span></h1></div>
                            <div class="col-sm-2 column"><h1><span class="car_item label" th:onclick="multipleFile_manager.initImgList(this,[[${carInfo.carId}]],[[${carInfo.configType}]],'battery-pack-detail')">电池包细节照</span></h1></div>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">备注：</label>
                        <div class="col-sm-8"><textarea name="remark" class="form-control">[[*{remark}]]</textarea></div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label"></label>
                        <div class="col-sm-8"><button type="button" class="btn btn-success" onclick="submitHandler()">上传</button></div>
                    </div>
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <th:block th:include="include :: bootstrap-fileinput-js" />
    <th:block th:include="include :: select2-js" />
    <th:block th:include="include :: bootstrap-select-js" />
    <script th:inline="javascript">
        var prefix = ctx + "system/car/info";
        $("#form-info-edit").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                let json=$('#form-info-edit').serializeJson();
                console.log(json)
                $('#car_info').val(JSON.stringify(json.infoMap)||'{}');
                let serialize = $('#form-info-edit').serialize();
                console.log(serialize)
                // console.log(JSON.stringify($('#form-info-edit').serializeJson()))
                // return;
                $.operate.save(prefix + "/edit?_="+Math.random(), serialize);
            }
        }
        $(function (){
            multipleFile_manager.init({busId: [[${carInfo.carId}]], busType: [[${carInfo.configType}]], fileType: 'img'});
        });
    </script>
</body>
</html>